<extend name="layout:index"/>
<block name='content'>
	<div class="mws-panel grid_8">
	    <div class="mws-panel-header" style="min-width:720px">
	        <span></span>
	    </div>
	    <div class="mws-panel-body no-padding" style="min-width:740px">
	        <form class="mws-form" action="__MODULE__/article/insert" method="post" onSubmit="return checkSubmit(this)">
	        	
	            <div class="mws-form-inline">
	                
	                <div class="mws-form-row">
	                    <label class="mws-form-label">公告标题</label>
	                    <div class="mws-form-item">
	                        <input type="text" class="small" name="title" value="" id='title'>
	                        <span id='empty_title' style='color:red;margin-left:5px'></span>
	                    </div>
	                </div>
	                <div class="mws-form-row">
	                    <label class="mws-form-label">公告描述</label>
	                    <div class="mws-form-item">
	                        <input type="text" class="small" name="description" value="" id='description'>
	                        <span id='empty_description' style='color:red;margin-left:5px'></span>
	                    </div>
	                </div>
	               
	               
	                <div class="mws-form-row">
	                    <label class="mws-form-label">公告内容</label>
	                    <div class="mws-form-item">
	                    	<!-- 加载编辑器的容器 -->
						    <script id="container" name="content" type="text/plain" id='content'>
						    </script>
						    <!-- 配置文件 -->
						    <script type="text/javascript" src="__PUBLIC__/admin/utf8-php/ueditor.config.js"></script>
	                        <!-- 编辑器源码文件 -->
    						<script type="text/javascript" src="__PUBLIC__/admin/utf8-php/ueditor.all.js"></script>
	                    </div>
	                </div>          
				
			
	            <div class="mws-button-row">
	                <input type="submit" value="添加" class="btn btn-danger">
	                <input type="reset" value="重置" class="btn ">
	            </div>
	        </form>
	    </div>
	</div>
    <script type="text/javascript">
        var ue = UE.getEditor('container');
       
	function checkSubmit()
	{

		if($('#title').val() == ''){
			$('#empty_title').html('请输入标题');
			return false;
		}else{
				$('#empty_title').html('标题合法');
				$('#empty_title').css('color','green');
					if($('#description').val() == ''){
					$('#empty_description').html('请输入描述');
					return false;
			}else{
				$('#empty_description').html('描述合法');
				$('#empty_description').css('color','green');
					
					return true;
			}
		}
		
		
      
	}
    </script>

</block>
